﻿using JESAI.Application.Abstractions.Test.Dtos;
using JESAI.AutoMapper.ObjectMapping;
using JESAI.AutoWebApi.Setting;
using JESAI.Core.Attributes;
using JESAI.DDD.Repositories;
using JESAI.Platform.Domain.Abstractions;
using JESAI.Platform.Domain.Test.Entities;
using JESAI.Platform.Domain.Test.Repositories;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JESAI.Platform.Domain.Test.Manager
{
    [AppService]
    public class TestManager:ITestManager, IAutoApiService
    {
        private readonly IRepository<TestEntity> _repository;

        private readonly ITestRepository _testRepository;
        public TestManager(IRepository<TestEntity> repository, ITestRepository testRepository) =>
            (_repository, _testRepository) =
            (repository, testRepository);

        public List<TestDto> GetAll()
        {
           var entities= _testRepository.GetAllTest();

            return entities.MapTo<List<TestDto>>();
        } 
        

    }

}